using System;
using System.Globalization;
using System.Windows.Data;

namespace OpenLS.Drawing.UI.Internals
{
    class ToGeometryConverter: IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            IShape shape = (IShape)values[0];
            Geometry geometry = (Geometry) values[1];
            return geometry.GetWPFGeometry(shape.ShapeProperties, this.Arrows);
        }

        public bool Arrows{ get; set; }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
}